#!/bin/sh

# expecting cord is in the PATH

if [ $# -lt 1 ]; then
	echo usage:
	echo     $(echo $0|sed 's/.*\///g') datafile1.h5 \[ datafile2.h5 ... \]
	exit -1
fi

while [ $# -gt 0 ]; do
	f=$1
	shift
        if [ ! \( -f ${f%.hdf}.dx -a \( ${f%.hdf}.dx -nt $f \) \) ]; then
                cord --h5todx -i "$f";
        fi
done


